home *** CD-ROM | disk | FTP | other *** search
- function NinjaCinematic()
-
- Camera.CinemaMove( Vector3(170,15,170), Vector3(170,0,130), 2 );
-
- GameWait(2)
-
- TraitorTalk( "It's Quiet. Shh! Did you hear that?" );
- Camera.CinemaMove( Vector3(170,15,170), Vector3(126,0,170), 5 );
- GameWait(4)
-
- G.CreateAt( "Ninja", Vector3( 125, 0, 125 ) );
- GameWait(0.25)
- G.CreateAt( "Ninja", Vector3( 130, 0, 125 ) );
- G.CreateAt( "Ninja", Vector3( 125, 0, 130 ) );
- Camera.CinemaMove( Vector3(170,15,170), Vector3(130,0,130), 0.5 );
- GameWait(0.5)
- G.CreateAt( "Ninja", Vector3( 135, 0, 125 ) );
- G.CreateAt( "Ninja", Vector3( 125, 0, 135 ) );
- GameWait(0.25)
-
- TraitorTalk( "AHH! Ninjas!" );
- GameWait(3)
-
- end
-
- --Common Level Start Code
- function LevelStartup()
-
- G.Create( "MenuData/HudCog.xml" );
- G.Create( "Data/GameCamera.xml" );
- G.Create( "Data/CursorCog.xml" );
-
- MainLevel = G.Create( "Data/Levels/Campaign5.xml" );
- MainLevel.CreateLevel();
-
- G.SetInvSpeed( 20 );
- HUD.EnterLevel();
- G.SetGameState( InLevel );
-
- G.SetMaxKills(0)
- G.SetPoints( 0 );
-
- G.SetLightTime( 1 );
- G.PostP( "Glare" );
-
- -- gameStartTime = 10000000;
-
- HUD.Message( "VictoryCondition" , "SetText", "Negate the Ninja Invasion!" );
- HUD.Message( "LossCondition" , "SetText", "If the Tower falls you lose." );
-
- TraitorCanBeHidden = true
- --TraitorTalk(" ");
- end
-
- LevelStartup()
-
- function LevelIntro()
-
- local tempPos = Tower.GetPosition()
- Camera.LookAtPosition( tempPos )
-
- gameStartTime = GameTime;
-
- --ColorTextPopup( "Level 5: A Knife In The Shadows", Color(1,1,1,1) )
- ColorTextPopup( "Level 5: Shadow's Knife", Color(1,1,1,1) )
- --ColorTextPopup( "Level 5: Shades of Steel", Color(1,1,1,1) )
-
- G.DisableTrapAll()
-
- G.EnableTrap("wall");
- G.EnableTrap("bomb");
- G.EnableTrap("laser");
- G.EnableTrap("fan");
-
- DisableTraitor()
- GameWait(1.5)
-
- TraitorTalk("Shh! I woke you up because I heard someone sneaking around.")
- GameWait(5)
- TraitorTalk("I set up some flash bulb traps really quickly, but I dont know if it'll be enough. Here are the blueprints...")
- GameWait(5)
- TrapTextPopup("Flash Bulb")
- G.EnableTrap("bulb");
- GameWait(5)
- TraitorTalk("Flash Bulb traps will provide some light, and temporarily blind any nearby invaders.")
- GameWait(7)
- -- TraitorTalk("Shh! Did you hear that? I think someone's here!");
- -- GameWait(5);
-
- StartCinematic();
- NinjaCinematic()
- EndCinematic();
-
- DisableTraitor()
- end
-
- function LevelSequence()
- -- Start Spawning the guys
- NinjaWave = createSpawnStruct()
-
- NinjaWave.Prob.Ninja = 1.0;
-
- NinjaWave.SpawnSpeed = 3.0;
- NinjaWave.MaxSpawn = 20;
- NinjaWave.TotalSpawn = 5;
- NinjaWave.GroupPercent = 0.15;
- NinjaWave.GroupSize = 1;
- NinjaWave.WhereToSpawn = CircleAroundTower
-
- MainWave = createSpawnStruct()
-
- MainWave.Prob.Basic = 3.0;
- MainWave.Prob.Miner = 2.0;
- MainWave.Prob.Driller = 1.0;
- MainWave.Prob.Ninja = 5.0;
-
- MainWave.SpawnSpeed = 1.5;
- MainWave.MaxSpawn = 25;
- MainWave.TotalSpawn = 45;
- MainWave.GroupPercent = 0.15;
- MainWave.GroupSize = 1;
- MainWave.WhereToSpawn = CircleAroundTower
-
- AmbushWave = createSpawnStruct()
-
- AmbushWave.Prob.Kamikaze = 5.0;
- AmbushWave.Prob.Ninja = 5.0;
-
- AmbushWave.SpawnSpeed = 2.0;
- AmbushWave.MaxSpawn = 25;
- AmbushWave.TotalSpawn = 50;
- AmbushWave.GroupPercent = 0.15;
- AmbushWave.GroupSize = 1;
- AmbushWave.WhereToSpawn = CircleAroundTower
-
-
- InvaderTextPopup( "Ninja" );
- GameWait(3)
-
- AddWave( "NinjaAttack", NinjaWave )
- G.SetMaxKills(10);
- GameWait(3)
-
- WaitForClearEnemies( )
-
- TraitorTalk("Wow, ninjas! They're so cool!")
- GameWait(5)
- TraitorTalk("Er, I mean... stupid ninjas, attacking at night.")
- GameWait(6)
- TraitorTalk("They're extremely fast, and as you saw, they can also jump over walls.")
- GameWait(6)
- --TraitorTalk("Here, I've got something else for you. Its a giant Bug Zapper trap. It does major damage to anyone close by.");
- --GameWait(3)
- --ColorTextPopup( "New Trap: Bug Zapper!", Color(0,0,0.85,1) )
- --G.EnableTrap("zapper");
- --GameWait(7);
- TraitorTalk("Build up some defenses, I bet more will be coming soon. *Yawn* I'm tired... I'm gonna go take a nap.");
- GameWait(3)
- G.EarnPoints( 300 );
- GameWaitOrMoney(25)
-
- NinjaWave.TotalSpawn = 30;
- G.SetMaxKills(40);
- GameWait(3)
-
- WaitForClearEnemies( )
- --AddWave( "MainAttack", MainWave )
- --G.SetMaxKills(80);
-
- --WaitForTimeOrKills( 500, 80 )
- --StopWave( "MainAttack" )
-
- TraitorTalk("Wow... that was brutal. I'll go see if we have anything else to throw at them.")
- GameWait(7)
- TraitorTalk("Ah!! Here we go! Blueprints for a Flame Turret.")
- GameWait(6)
-
- TrapTextPopup("Flame Turret")
- G.EarnPoints( 150 )
- G.EnableTrap("flame");
- GameWait(3)
-
- TraitorTalk("Any invader who gets too close will be set aflame.")
- GameWait(5)
- TraitorTalk("And as an added bonus, anyone who touches a burning invader ignites as well.")
- GameWait(7)
- TraitorTalk("We invaders are quite flammable that way...")
- GameWait(5)
- TraitorTalk("Just be sure to keep those things away from me!")
- GameWait(5)
-
- MainWave.TotalSpawn = 75;
- AddWave( "MainAttack", MainWave )
- G.SetMaxKills(115);
- InvadersKilledWait(115);
- StopWave( "MainAttack" )
-
- GameWait(5)
- TraitorTalk("Wait, this seemed too easy ...")
- GameWait(7)
- TraitorTalk("Beef up the defenses just in case.")
- GameWaitOrMoney(15)
-
- AddWave( "AmbushAttack", AmbushWave )
- G.SetMaxKills(165)
-
- TraitorTalk("Ahhhh!! Look out!!!")
- GameWait(5)
-
- InvadersKilledWait(165);
- StopWave( "AmbushAttack" )
- GameWait(3)
-
- TraitorTalk("*huff* *huff* Whew! That was close, but we made it! You rock!")
- GameWait(7)
-
- G.SetGameState( Victory );
-
- TraitorTalk("I wonder what tomorrow will bring...");
- GameWait(3)
-
- -- G.SetGameState( Victory );
-
- end
-
-
- levelRoutine = coroutine.create(LevelIntro);
-
- GMain["LevelUpdate"] = LevelUpdate;
-